On a comparison theorem for solutions of stochastic differential equations and its applications