Ions of higher concentration will be selectively discharged.
For example, if a CONCENTRATED copper (II) chloride solution is used, chlorine gas is produced at the anode. Why so? Because the electrolyte has a higher concentration of chloride ions compared to hydroxide ions.
Another example, if a DILUTE copper (II) chloride solution is used, oxygen gas is produced at the anode. Hydroxide ions are discharged because the concentration of chloride ions is lower than that of hydroxide ions.
Did I help?