Ionic compounds become soluble in any liquid which is capable to break the ionic bond in them. And water breaks the ionic bond by hydrogen bonding ,since,water itself has more ionic bond and polar in nature. But other solvents such as kerosene and petrol are not capable to break the ionic bond and hence,cannot dissolve them,since they all have covalent bonds and are non polar in nature.