I am wondering if this SQL- statement could some how work in Salesforce Marketing Cloud. I always got the error message:
An error occurred while checking the query syntax. Errors: Incorrect syntax near the keyword 'IF'.
SELECT
IF LetterSalutationMCD('Sehr geehrte Frau')
SELECT ('Sehr geehrte Frau'+Lastname) as Anrede,
IF LetterSalutation('Sehr geehrter Herr')<br><br>
SELECT ('Sehr geehrter Herr'+Lastname) as Anrede,
ELSE <br><br>
SELECT ('Sehr geehrte Damen und Herren') as Anrede