Conditionally exactly solvable potential and dual transformation in quantum mechanics