示例: SELECT *, if (`date_last` IS NULL,prev_date,last_date) as date FROM `table_name` WHERE `id` = 2 ORDER BY `date` DESC