title: Logic required for Comparison in SQL Server
body: <p>The Structure is as following.</p>
  
  <pre><code>+---------------+
  |    Type 1     |
  +---------------+
  |Below 50 (Red) |
  |50&lt;100 (Orange)|
  |150&lt;200 (Green)|
  |200 Above(Blue)|
  +---------------+
  </code></pre>
  
  <p>as there will be Type <code>2,3,4</code> need to check when I pass value like say <code>75</code> which should be <code>between 50 &lt; 100</code> and the structure should be in table Type <code>1,2,3,4</code>.
  How can I do this possibly, I need a query to check between them. I can hard code the matter easily which i can pass the values for stored procedure but i need this table for match and check the colors i need. Any help would be appreciated.</p>