title: Trying to show multiple various number to show it as text
body: <p>Trying to figure out where I went wrong with this one.
  I tried to add number values 0-7 a varchar value and it gives me error:</p>
  
  <blockquote>
    <p>Msg 156, Level 15, State 1, Line 6 Incorrect syntax near the keyword
    'case'.</p>
  </blockquote>
  
  <p>Also using SQL studio on Axapta database.</p>
  
  <pre><code>select 
  
  d.itemid as 'Kaubakood ja nimetus',
  k.referenceid as 'Number',
  d.qty as 'Kogus',
  d.statusissue case  when '0' then 'None'
                      when '1' then 'Müüdud'  
                      when '2' then 'Maha arvatud'
                      when '3' then 'Komplekteeritud'
                      when '4' then 'Füüsiliselt reserveeritud'
                      when '5' then 'Reserveeritud tellitud'
                      when '6' then 'Tellimusel'
                      when '7' then 'Pakkumiste väljaminek'
                  Else statusissue end as statusissue,
  d.shippingdateconfirmed as 'Tarne Kuupäev',
  d.invettransorigin as 'Partii number'
  
  
  from 
      INVENTTRANS d WITH (INDEX(I_17117RECID),NOLOCK),
      INVENTTRANSORIGIN k WITH (index(I_2911138RECID),NOLOCK)
  where 
          d.DATAAREAID='EWH1' 
      and d.PARTITION=56371445761 
      and d.recid = k.recid
      and d.itemid = '7547511'
  </code></pre>