Conditional Merge Fields

How to create conditional merge fields in Google Sheets whose content is formatted based on other merge fields for a mail merge?