[SalesForce] Conditions inside html email template for picklist values

I am new to salesforce and my scenario is like this:
Based on the status value of Case object I need to make the link present in HTML email template dynamic. ie.:
If I select Closed as status value then the link in the email should be changed to "www.example.com".
If I select New as status value then link in the email should be changed to "www.example.org".
I tried using a if statement but it doesn't seem to work, as it is displaying the merge field as it is.

Best Answer

1) You can create two workflows on case that has condition based on the status value. For first workflow conditon is status == new For first workflow conditon is status == closed Associate different email template according to your requirement.

2) You can Create a formula filed in that you can change the value of the formula field based on the picklist value and then you can send the formula field value in the email template.