Your body has to bring the cold water up to its own temperature, thereby burning calories. Therefore the answer to your question has certain conditions: if you value calories over being cooled down, then yes, you should drink warm water, but if you value being cooled down over calories, then you should drink cold water.
Even if you want to be cooled down, however, you should still avoid very cold drinks if you're exercising, as they can give you a stomach ache and even make you vomit. (YMMV.)
If you simply want to know if your body burns calories warming up the water, the answer is yes. [emphasis mine]
http://health.howstuffworks.com/wellness/diet-fitness/weight-loss/question447.htm
Also, avoid very cold drinks, because they can cause stomach cramps.
http://www.bt.cdc.gov/disasters/extremeheat/heattips.asp