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 N channel optical switch, each channel include n dissimilar wavelength carrying information with distinct space-phase, and any wavelength can turn into any other N-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 LiNbO3 using an Ar+ 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.