MySQL- if conditon fails (#1064 error)
Please have a look at IF statement at MySql Docs


  IF search_condition THEN statement_list
      [ELSEIF search_condition THEN statement_list] ...
      [ELSE statement_list] END IF  


Or at IF() function:

IF(expr1,expr2,expr3)

If expr1 is TRUE (expr1 &lt;&gt; 0 and expr1 &lt;&gt; NULL), 
IF() returns expr2. Otherwise, it returns expr3.


Your sentence should be something similar to:

SELECT 
    CONCAT(user1.name, ' ', user2.name)
    IF(user1.salary &lt; user2.salary, user1.salary, user2.salary) as userSalary
FROM `users` AS user1
LEFT JOIN users AS user2 ON user1.id = user2.id
ORDER BY user1.salary ASC