Select
column_name,
Case
When Exist (Select * from information schema.columns
Where table_name = 'table 1'
And column_name in (Select column_name
from information_schema.columns
Where table_name = 'table 1'))
Then 'populated'
Else 'not populated'
Конец как результат
From
information_schema.columns
Where
table_name = ‘table 1'
- оператор case не зацикливается для каждого отдельного имени столбца слева