Suppose we have 3 tables:
Table1:
ID FrenchCity
1 Paris
2 Lille
3 Lyon
Table2:
ID IntlCity
1 Lille
2 Geneva
3 Toulouse
Table3:
ID BritishCity
1 London
2 Leeds
I would like to get the column name correspondent with a value.
For instance, I give a value Lille and SQL should return Table1.FrenchCity Table2.IntlCity.
As I said, I would like to get the column name of a value. So Lille exists in 2 tables, I would like SQL to return the {{table name}}.{{column name}}
How to write a query to do that?