title: Query multiple columns on a given value in postgresql
body: <p>I have a table in my database (postgres)
  Table #1</p>
  
  <pre><code>----------------------------------------------------    
  | name  |  id_a |  id_b | id_c | id_d |  id_e | id_f    
  ----------------------------------------------------
  </code></pre>
  
  <p>I am now given a list of ids. Some of these ids belong to id_b, some to id_c and so on till id_f. 
  For these list of ids I need to find the corresponding id_a. </p>
  
  <p>Method #1
  Identify which ids belong to id_b, id_c and so on. 
  Then use multiple in clause in my mysql-query to fetch id_a</p>
  
  <pre><code>select id_a from Table #1 t1 where t1.id_b in () or t1.id_c in ().... or t1.id_f in ();
  </code></pre>
  
  <p>I am looking for an alternative way. </p>
  
  <p>Method #2</p>
  
  <p>Is there some way to query all the columns simultaneously for a given value. Something like </p>
  
  <pre><code>select id_a from Table #1 t1 where t1.id_b,t1.id_c,..t1.id_f in ();
  </code></pre>