title: how to use if conditions in mysql
body: <p>I am trying to get some results through query that would be in range from -50 to +50. now according to the range I need to have value in column comment.</p>
  
  <p>The conditions are</p>
  
  <pre><code>    &gt;=-50 and &lt; -30 = very negative
      =&lt; -30 and &lt; -10 = negative
      =&lt; -10 and &lt; +10 = neutral
      =&lt; +10 and &lt; +30 = positive
      =&lt; +30 and &lt; +50 = very positive
  </code></pre>
  
  <p>the output i am trying to get is:</p>
  
  <pre><code>range  comment
  -45     very negative
  -20     negative
  </code></pre>
  
  <p>I can just get the value how can i set comment according to it.</p>