title: How to check if a value exists in any of the columns in a table in sql
body: <p>Say, I have 100 columns in a table. I do not know in which columns a particular value could exist. So, I would like to check across all columns, if it exists in any of the 100 columns, I would like to select it.</p>
  
  <p>I searched around a bit, and in most places the solution seems to be something like the following</p>
  
  <pre><code>select * 
  from tablename 
  where col1='myval' 
     or col2='myval' 
     or col3='myval' 
     or .. or col100='myval'
  </code></pre>
  
  <p>I also read a few forums where having to do this is said to be a bad case of database design, I agree, but I'm working on an already existing table in a database.</p>
  
  <p>Is there a more intelligent way to do this?</p>