How would I find the column given a data-value in SQL?
11:15 27 Apr 2026

MRE:

I want to simplify (or more accurately, generalize) this query:

SELECT * FROM MRE_TABLE
WHERE col1 = 'my-data-val' OR col2 = 'my-data-val' OR ... there are 68 columns 

I really do not want to write 67 ORs for 4 different data-values.

PS: I'm not sure if UNPIVOT is what I need.

sql relational-database