The extend of bending in a medium depends on the refractive index of the medium. Since each liquid has a different refractive index, the extent of bending is different in different mediums. So, the pencil will appear to be bent to a different extent, if instead of water we use liquids like, kerosene or turpentine.