title: SQL - select * from X WHERE (if value is numeric, else ...)
body: <p>I would need to make a DB select that will behave differently when number or text is entered, just different condition should be used. I think it should be done but not quite sure with the syntax (MSSQL). Thank you</p>
  
  <p>I would need:</p>
  
  <pre><code>SELECT * 
    FROM X 
   WHERE (IF value passed is numeric = "ID" ELSE "NAME") = Value //ID or Name are columns
  </code></pre>