title: How to calculate value with multiple condition and how to design database?
body: <p>I need to calculated data with multiple condition </p>
  
  <pre><code>MinOTHrs    MaxOTHs     DayType          Rate
  ------------------------------          -----------
  3             -         Working_day        18
  4             11        Weekend            18
  11            -         Weekend            36
  </code></pre>
  
  <p>For example 
  if employee do OT on working_day > 3 Hrs. they will get rate 18 (MAX 18 for working_day)
  if employee do OT on weekend > 4 Hrs. but &lt; 11 Hrs. they will get rate 18
  if employee do OT on weekend > 11 Hrs. they will get rate 36(MAX 36 for weekend)
  Could you suggest me about coding and design database ?
  Thank you very much</p>