In this paper we present a method for selective three-photon excitation of the two dyes, p-Terphenyl (PTP) and BM-Terphenyl (BMT), in solution by using shaped pulses. A good agreement between experiment and theoretical simulation is obtained. With this method it is possible to achieve a considerable change of the Fluorescence contrast between the two dyes which is relevant for imaging applications of biological molecules.