title: MySQL CASE statement syntax with * operator explaination
body: <p>I have a CASE statement that looks like the following </p>
  
  <pre><code>        case
              when ph.term_start_date &gt; x.year1 then 0
              DATEDIFF(case when ph.term_end_date &gt; x.year1 then x.year1 else ph.term_end_date end, greatest(x.report_date, ph.term_start_date))
          end days_remaining_year1,
          case
              when ph.term_start_date &gt; x.year1 then 0
              DATEDIFF(case when ph.term_end_date &gt; x.year1 then x.year1 else ph.term_end_date end, greatest(x.report_date, ph.term_start_date))
          end *(ph.amount + ifnull(y.credit,0))/DATEDIFF(ph.term_end_date, ph.term_start_date) as deferral_year1,
  </code></pre>
  
  <p>I need to understand what the <code>*</code> after the <code>END</code> keyword on the last line means. I thought after the end keyword you had to specifiy a column that will appear in the result set</p>
  
  <pre><code>Case 
  When ( something )
  end ( return column )
  </code></pre>