Per @GordonLinoff's answer; in MySql a trigger is the best way to achieve this constraint. Do you have a specific reason for not wanting to use a trigger?
Since you've explicitly asked for options other than triggers, here are some alternate options:
Stored Procedure
Use a stored procedure to do inserts into this table / include the validation logic here.
This ensures that anything inserting / updating via the stored procedure is protected; but has the issue that this validation may be bypassed by someone directly inserting data into the table.
That issue can be alleviated by using security to ensure that only the stored procedure has rights to insert into this table / update those fields. See this answer for more detail on setting up this security: https://mcmap.net/q/1163330/-how-to-allow-insert-through-stored-procedure-only
Client Code
Similar to the stored procedure option; if you own all code that will be performing these inserts/updates, you can add the validation outside of the database. Again, your validation can be bypassed (i.e. by going straight to the database), but that's only a concern if users have access to your database. If your application is the only way to manipulate data in the DB this is sufficient. The stored procedure option's preferable, but if there's some reason it's not viable, this is your next best option.
Asynchronous Integrity Checks
The last option would be to have some job periodically running data integrity checks and reporting on issues. This won't prevent the data going wrong, but will help you become aware of it quickly so you can investigate & resolve it. Generally I'd avoid this since preventing bad data is far better than cleaning it up later; but in some use cases this is the only option.
Amend Data Model
@SqlVogel's answer (suggesting a change of model) is also excellent; i.e. what's the difference/relationship between a project
and a special case
? Could they be modeled as the same thing; only with additional properties being available for one and/or the other.