Sort sql query result and concantenate : I have three tables country,state and city

 [![enter image description here][1]][1]

  [1]: https://i.stack.imgur.com/zfDta.png

I need the results to be in the format

> ***country***  |  ***all the states belongs to the country***  | ***all the city**
> **belongs to the country***


How can I do that without a temp table?