--Write an SQL query to display the correct message (meaningful message) from the input
--comments_and_translation table. */


create table comments_and_translation
(
id int,
comments varchar(100),
translation varchar(100)
);

insert into comments_and_translation values
(1, 'very good', null),
(2, 'good', null),
(3, 'bad', null),
(4, 'ordinary', null),
(5, 'cdcdcdcd', 'very bad'),
(6, 'excellent', null),
(7, 'ababab', 'not satisfied'),
(8, 'satisfied', null),
(9, 'aabbaabb', 'extraordinary'),
(10, 'ccddccbb', 'medium');

/*select * from comments_and_translation*/


select 
case when translation is null then comments
else translation 
end as output
from comments_and_translation

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: