I got a table like this, values are all booleans, except for
col1 | col2 | col3 | col4 | col5 ...
row1 | f | t | t | t
row2 | f | f | f | t
row3 | t | f | t | f
select all columns for row3 where value=t
select all column-names for row3 where value=t
That is not really how SQL works. SQL works on rows, not columns.
What this suggests is that your data structure is wrong. If, instead, you stored the values in rows like this:
col1 name value row1 'col1' value . . .
Then you would just do:
select name from t group by name having count(*) = sum(case when value then 1 else 0 end);
With your structure, you need to do a separate subquery for each column. Something like this:
select 'col2' from yourtable having count(*) = sum(case when col2 then 1 else 0 end) union all select 'col3' from yourtable having count(*) = sum(case when col3 then 1 else 0 end) union all . . .