This is a tough one for me. I think I read somewhere on here that Khan has done very well in the UAE but not away from home. First off, the UAE isn't home and one of the grounds doesn't even have a Pakistani pitch curator. Second, much like Dravid, Khan has been the guy Pakistan have looked for to get them away wins or out of a sticky situation. They are so similar it's ridiculous.
Once again, their numbers are exceptional when they've had to bat second, against an absolute pile of runs. Khan's 313 was awesome, as was Dravids highest score of 270. Khan however, had to often do it with his back against the wall, wickets falling, middling batsmen trying their best to portray test players. All the while Dravid had the comfort of Tendulkar, Gangulay and even VVS and Sehwag.
Let's not forget one of the most remarkable of all test innings, Khans 171 is one of the top 5 highest 4th innings scores ever. It was match winning too. Sticking to the match winning aspect, Khan has a highest percentage of test wins away, which is made even more remarkable by the sheer weight of his runs in those wins. Most recently the 218 (I believe his 3rd away, match winning double) against England. Dravid never managed those same number of big innings.
All in all, if we're looking ONLY at tests then I gotta go with Khan. Them ore fluid, more aggressive run maker who has a vast appetite for 150+ scores. That's the guy I'd want at 3 or 4.