how can I use a CASE with an alias defined befor case?
OK, I'll take the provided example, and modify it a bit:

select  
    (&lt;insanely complex expression&gt;) as pop,
    case 
        when pop is null then 'isnull'
    end
from rap4 ;


The above will of course produce an error because an alias defined in the SELECT list, cannot be used in another expression in the same SELECT list or the (same level) WHERE or GROUP BY clauses.

What you can do however is either duplicate the expression:

select  
    (&lt;insanely complex expression&gt;) as pop,
    case 
        when &lt;insanely complex expression&gt; is null then 'isnull'
    end
from rap4 ;


or use a derived table:

select
    pop,
    case 
        when pop is null then 'isnull'
    end
from 
    ( select  
          (&lt;insanely complex expression&gt;) as pop
      from rap4
    ) t ;


or use a common table expression (CTE):

with cte as
  ( select  
        (&lt;insanely complex expression&gt;) as pop
    from rap4
 )
select
    pop,
    case 
        when pop is null then 'isnull'
    end
from cte ;