Select with if statement return 'column does not exist'
You have two errors in your statement: 


There is no IF in SQL, you need to use a CASE expression
String constants are defined using single quotes in SQL ('), double quotes are for identifiers


select case 
          when available_count &lt; 5 then 'neni skladem'
          else 'na sklade'
       end as availability
from ...