title: SQL Server - Select columns that meet certain conditions?
body: <p>My COLUMNS can contain only three values or var chars - economy, basic, luxury. I want to select a ROW and display only those COLUMNS which contain luxury. The problem is that there are many such columns - about 50. I don't want to type the names of all those columns in my select query. Is there a shorter and simpler alternative to this ? Which query should I use ?</p>
  
  <p>I am thinking of something like this (<strong>this is a FAKE query</strong>) - </p>
  
  <pre><code>@declare Column_Name varchar(30)
  select Column_Name where Column_Value = 'luxury' 
  from ATable
  where rowId = 'row 5';
  </code></pre>
  
  <p>Table structure - </p>
  
  <pre><code>rowId | Column1 | Column2 | Column3.....
  </code></pre>