By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE Users(StudentStatus VARCHAR2(100))
INSERT INTO Users
VALUES('99')
1 rows affected
INSERT INTO Users
VALUES(NULL)
1 rows affected
INSERT INTO Users
VALUES('100')
1 rows affected
SELECT StudentStatus, DECODE(StudentStatus, '99', 'Y', '', 'Y', 'N')
FROM Users
STUDENTSTATUS | DECODE(STUDENTSTATUS,'99','Y','','Y','N') |
---|---|
99 | Y |
null | Y |
100 | N |