Select the Scheme and Table based on Select result in Postgresql
You can't. Columns can tell information that's useful but none of it will get you to a value without sending a query. So you'll have to have two queries,


Getting the column name,
Selecting rows where a specific column name is set to a value.


That second query requires planning. Some queries on column names don't require visiting the heap -- such as an index-only scan. Some are greatly sped up by visiting an index first, so you don't have to visit the entire heap and the values for the column are not stored on the column anyway, they're stored in a heap in PostgreSQL.

This may not be ideal, but it's what you've got to work with. See also


Search all columns as a single text per row
Hide columns that are constant across a small number of rows