Nested ternaries are hard to read and can make the order of operations complex to understand.
SELECT IIF(@status = 'RUNNING', 'Running', IIF(@hasError, 'Failed', 'Succeeded')) -- Noncompliant
Instead, use another line to express the nested operation in a separate statement.
IF @status = 'RUNNING'
SELECT 'Running';
ELSE
SELECT IIF(@hasError, 'Failed', 'Succeeded');