Wiring new ceiling fan to existing light switch box
You can't have one switch operate light OR fan. Many jurisdictions absolutely require that a switch on the wall near a room entrance, control a lamp. That is to benefit house guests and mainly from the government's perspective, first responders. There's an exception to allow a switched outlet instead, presuming a person is going to plug a floor lamp into that.  There is no exception to allow a fan/light locally switched at the fan. (such things can exist, they can't be the only light). That said: 

They now make gadgets to solve the "I have 14/2 and wish I had 14/3" problem.  Each has a smart switch (typically 1-gang) with 2 controls, and a control module which sits under the fan shroud.   The switch communicates with the module either via powerline networking or via wireless, and some of those are compatible with smartphones or integrated home-automation systems as are now emerging in the market.