There have been ways in the past you could use (hack) custom formula's within Classic Email Templates to render content depending on the scenario. For example, you can use this formula directly in the email template –
{!IF(Custom_Field__c = 'something', 'Show something which means
success', 'Else show this part')}.
As of Spring '20 Release, Salesforce has put in a validation check to stop the user from inserting malformed Merge Fields (ref Release Notes). What's more is that the error doesnt show up when you are in 'Edit HTML version' mode (stays in Edit mode, does not save, no errors displayed).
PS – This doesnt affect existing templates (the formulas there will still work). But you can no longer edit them or create new ones with Formulas.
Best Answer
Solution - It is normal for Admins/Devs to click the 'Copy from HTML' button on the Text version page while creating the Template. Therefore, your custom formulas will be copied over as well and you'll observe that you're unable to edit/save the template containing these as part of the Spring '20 update.
You need to remove the custom formulas (SF treats it as malformed merge fields now - see Release Notes) in the Text version.
You will be unable to save the Email Template if the custom formula exists in the Text Version of the template. The error will be visible when you try to 'Edit Text version'. This is the error you will get -
Issue Reference - https://success.salesforce.com/issues_view?id=a1p3A000000KRL6QAO
Release Notes - https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_sales_productivity_email_templates_malformed.htm
Since SF has not mentioned it in their Known Issue - see Ref (probably because they don't support/have no documentation on supporting Custom Formulas in Email templates), I had to spend some time debugging this. I personally don't use the Text version, so removed it altogether. Thereafter, I was able to edit/save the HTML version. Hope this helps people who are blocked on saving emails templates which use custom formulas.
Edit 1 - Upon further investigation I found that some of my Custom templates were completely locked out - There was no way of editing them at all (please see point 2 below). Upon following up with Salesforce Premier+ support, I was informed that their Product Team is aware about it but they had no workaround or fix date for this. There are 2 ways at the moment -