Denoman FTW.
Aaaanyways. Mad Milk Scout who knows his stuff is damn good against a pyro, from personal experience. Still, not top choice for people who don't play scout for main.
Soldier is bad, considering the rockets can get reflected, and the alternatives are slim.
Pyro can work if you're good with a shotgun and know pyro strategy.
Demo is good because of all the items and item sets he has to reduce fire damage (Charge N Tard, Ordinance set).
Heavy's good, 'cause, well, you're a heavy. Hard to kill, easy to kill with.
Engineer is your last option for a rage move. Build a sentry, camp and wait. Hope he goes on frontlines.
Medic is a "no", unless you're fucking phenomenal with Crusader's or Blutsauger.
If it's a big map, Sniper is good, but only if you're looking at places that you know he'll be in.
I don't even need to comment on Spy.