如果您也想考虑null值的相等性,请尝试以下操作
select column1, column2, case when column1 is NULL and column2 is NULL then 'true' when column1=column2 then 'true' else 'false' end from table;

如果您也想考虑null值的相等性,请尝试以下操作
select column1, column2, case when column1 is NULL and column2 is NULL then 'true' when column1=column2 then 'true' else 'false' end from table;