sql boolean 0/1 To Represent true or False

Alf*_*ima 9 sql

In my database 1 is used to represent true and 0 to represent false. In my column, now i was wondering if anyone can help me write a query that outputs if the value equals to 1 display true if equals to 0 display false?.

Rob*_*ert 13

尝试使用 case

select case when col = 1 then 'true'
            when col = 0 then 'false'
       else 'NN'
       end as val  
Run Code Online (Sandbox Code Playgroud)