The theoretical model of a photorefractive optical switch, which is implemented by adjusting the wavelength and space-phase of the read-out beam to control the diffraction direction of volume grating in a photorefractive crystal, is proposed. For <i>N</i> channel optical switch, each channel include <i>n</i> dissimilar wavelength carrying information with distinct space-phase, and any wavelength can turn into any other <i>N</i>-1 channel controlled by space-phase. In order to obtain this device, multiple holograms be recorded in a photorefractive crystal, performing an optical database accessible either by wavelength or by space-phase multiplexing. The holograms were written in a Fe doped LiNbO<sub>3</sub> using an Ar<sup>+</sup> laser with its three wavelength. The diffraction direction depended on wavelength and space-phase of the read-out beam, which agrees with the theoretical prediction and indicates that photorefractive crystal possesses excellent optical switching properties. It is demonstrated that the diffraction direction of the volume grating is relevant to the wavelength and space-phase of read-out beam; this property can be used to implement the all-optical switch.