Can I have a 20 amp breaker with 12 gauge wire run to a switch that is a 15 amp and use 14 gauge wire from the switch to the ceiling fan only?
No. You could have a 15 amp breaker, and this would then be fine (oversized wire is OK.)
For the record:
Yes, you can use a 15 amp switch as long as the load does not exceed 15 amps. Here is the pertinent Code article:
404.14 Rating and Use of Snap Switches. Snap switches shall be used within their ratings and as indicated in 404.14(A) through (F).
(A) Alternating-Current General-Use Snap Switch. A form of general-use snap switch suitable only for use on ac circuits for controlling the following:
(1) Resistive and inductive loads not exceeding the ampere rating of the switch at the voltage involved
So, the switch has to be rated for the load not the circuit.