Dividir la alerta en 2 campos
Alert_count: integer
Alert_period: enum('hour','day','month','week')
Y cambie la consulta así:
SELECT *
FROM `activities`
WHERE CASE alert_period
WHEN 'hour' THEN date_sub(`deadline`, INTERVAL alert_count HOUR) >= CURDATE();
WHEN 'day' THEN date_sub(`deadline`, INTERVAL alert_count DAY) >= CURDATE();
...
END CASE