title: CASE WHEN after THEN or Select value from other table
body: <p>I need to do this:</p>
  
  <pre><code>SELECT 
  COLUMN1,
  COLUMN2,
  CASE SOMETHING WHEN 0 THEN 'SOMETHING'
     ELSE
        CASE SOMETHING1 WHEN 'SOMETHING2' THEN (Here I need my value from other table)
     ELSE
     ...
     ELSE
     ...
  END
  END
  AS SOMETHINGSPECIAL
  ...
  ...
  ...
  </code></pre>
  
  <p>Entire select is horribly complicated sorry.</p>
  
  <p>In the place after THEN in () I need to take out specific value from other table.
  I have tried almost everything there is from joins, to put there <code>SELECT WHERE</code> or <code>CASE WHEN</code> statement it always end up with some error.
  Keyword missing etc.</p>
  
  <p>Also maybe problem is inside () there is long concatenate:
  '' </p>
  
  <p>I need to put that specific value from other table into that concatenate.
  It either doesn't want to allow me to use other <code>CASE WHEN</code> after that <code>THEN</code> or I'm doing something wrong.</p>
  
  <p>EDIT (sorry can<code>t post entire query don</code>t wanna have problems in work):</p>
  
  <pre><code>SELECT 
  A.SOMETHING
  CASE WHEN A.LIST_ID IN ('something','something') THEN '&lt;A HREF="something?thresholdId=something' || GET_SITE_SUFFIX() || chr(38) || 'task=runSQL' || chr(38) || 'parseParams=true' || chr(38) || 'list_id=' || A.LIST_ID || chr(38) || 'list_name=' || A.LIST_NAME || '"&gt; (MY VALUE FROM OTHER TABLE HERE) &lt;/A&gt;'
  END 
  AS SOMETHINGSPECIAL
  FROM SOMETABLE
  ...
  </code></pre>
  
  <p>(MY VALUE FROM OTHER TABLE HERE) I tried to put there Select statement condition, Case statement to take out that one value from other table but it just gives me error.</p>