IF function in mail template

IF function in mail template

Hi,
I am looking for an IF function for an mail template, but i cant find some information.

In eg. i will use this function:

IF ${Leads.Salutation} = "Herr", THEN "Sehr geehrter Herr", ELSE ( IF ${Leads.Salutation} = "Frau", THEN "Sehr geehrte Frau", ELSE "Sehr geehrte Damen und Herren")

Can you help me?

Thanks Michael