This query is incorrect one :
SELECT DBNAME
FROM SYSIBM.SYSTABLEPART
WHERE DBNAME like
CASE DAYOFWEEK(CURRENT DATE)
WHEN 1 THEN ‘B11%’
ELSE ‘B12%’
END’
****it gives a msg:An incorrect value is used in a LIKE comparison (line 3, position 10). If i used the ‘=’ equal sign instead of like then it works ok.. This sql is run under DB2. I think that “like” does not work with CASE .