I have two tables called order and public holiday as following:
Order Table:
OrderId OrderDate
---------------------------
1 10 Mar 2017
Two things to remeber:
Possible solution:
SELECT O.OrderId,
O.OrderDate,
CASE
WHEN H.HolidayDate IS NOT NULL
THEN 'Public holiday'
ELSE TO_CHAR(O.OrderDate, 'Day')
END DAY
FROM ORDER_TABLE O
LEFT JOIN HOLIDAY_TABLE H
ON H.HolidayDate=O.OrderDate;