In aqueous medium, KOH ionises readily to form OH– ions which behave as a powerful nucleophile and cause nucleophilic substitution. These OH– ions being highly hydrated in aqueous medium, cannot abstract a proton (H+) form β-carbon. Hence elimination does not take place. But in alcoholic medium the ionisation of the base (KOH) is poor. So OH– ions behave as weak nucleophile and the substitution is chacked. Actually KOH in presence of alcoholic medium gives E2 elimination reaction to form alkene.
