if else condition not working in process email template

Hi,

I tried below in my process email template but not working :

"{if !empty($fields.choose_module_c) and ($fields.choose_module_c eq 'Company')} {::accounts::name::} {/if} {if !empty($fields.choose_module_c) and ($fields.choose_module_c eq 'Investor')} {::avds_Investors::name::} {/if}"

Please help me.

output is coming as in email received as below:

"

{if !empty($fields.choose_module_c) and ($fields.choose_module_c eq 'Company')}
kcb
{/if}

{if !empty($fields.choose_module_c) and ($fields.choose_module_c eq 'avds_Investors')}
kcb-PE-2023
{/if}"

THanks,

Shreya