IF ( DATEDIFF(h, GETDATE(), DATEADD(h,4,GETDATE()))>0 )
SELECT *
FROM table
WHERE MailDate is Tomorrow
ELSE
SELECT *
FROM table
WHERE MailDate is Today
This is MS SQL. If you want to do more then just one command/select inside the if you do BEGIN .... END.