There is only one such situation. Light rays go undeviated through a prism only when the prism is kept in a medium that has the same refractive index as that of the prism itself. In all other situations, there will always be some minimum deviation in the path of a light ray passing through the prism.