You should use an IF...ELSE... statement if you want to evaluate a condition.
With your query you're assigning the value to the variable, not comparing. It should be like this.
IF @CurrentDay = DAY(CURRENT_TIMESTAMP)
PRINT 'Today is the 24th day of the month'
After that, you should use the ELSE and generate an error. I will leave this to investigate and come back and ask for specific questions.
Here's a guide: