Syntax:

    IF expression THEN statement1 [ELSE statement2]

Obsidian Example:

    SELECT
      IIF( frontmatter->status = 'Done', '✔️', '⏹️') AS StatusEmoji
      FROM obsidian_markdown_notes WHERE

For example:

    IF EXISTS(SELECT * FROM one WHERE a=10)
       UPDATE one SET b = 200 WHERE a=10
    ELSE
       INSERT INTO one VALUES (5,500);

Alternative Syntax:

MySQL notation

SELECT IF(1>2,2,3);

Will return 3

or the MsSQL notation

SELECT IIF(1>2,2,3);

Will return 3