Alright let me explain my question with example
We have 1 table
This table contains
Id
Name
Number
Now example
1 House 4
2 Hospital 3
3 Airport 1
4 Station 2
Now when fetching as select * from table
I want to replace third column number values with that number representing Name
So example of fetching
1 House Station
2 Hospital Airport
3 Airport House
4 Station Hospital
How can i do this ? thank you
You can join the same table twice to replace the
numberwith thename. Theoncontidion in the join matches the table again and then you can select thenamefrom that table (t2)SQLFiddle Example