I'm not a wizard with macros, but I think this should work (remove the asterisks):
/cast *name of mount*
You can also try to insert a conditional for flying and no flying:
/cast [nomounted, flyable] *name of flying mount*
/cast [nomounted, noflyable] *name of ground mount*
Feel free to browse through Perks N Peeves
, my vanity pet collecting blog!