title: which max column is true
body: <p>I have a table with 6 fields--- customer id and 5 indicator variables.</p>
  <pre><code>cid, f1, f2, f3, f4, f5
  101, 1,  1,  1 , 0 , 0
  102, 1,  1,  0 , 0 , 0
  103, 1,  0,  0 , 0 , 0 
  </code></pre>
  <p>I want to get for each cust id which max field has true indicator.</p>
  <p>Output should be</p>
  <pre><code>for 101 -&gt; f3;
  for 102 -&gt; f2;
  for 103 -&gt; f1;
  </code></pre>
  <p><strong>SQL code to reproduce the example</strong></p>
  <pre><code>CREATE TABLE customer_status
  (
  cid int,
  f1 int,
  f2 int,
  f3 int,
  f4 int,
  f5 int);
  insert into customer_status values(
  101, 1,  1,  1 , 0 , 0);
  
  insert into customer_status values(
  102, 1,  1,  0 , 0 , 0);
  
  insert into customer_status values(
  103, 1,  0,  0 , 0 , 0);
  </code></pre>