That does seem to be what I was looking for but it isn't working.
Here's my full query:
SELECT s.shrineusercommentid, s.shrineid, s.parentid, s.authorid, s.content, s.posted, s.lastmodified, u.username
FROM shrineusercomments s LEFT JOIN users u ON u.userid=s.authorid
WHERE s.shrineid=1 ORDER BY (IF s.lastmodified>s.posted, s.lastmodified, s.posted) DESC LIMIT 0,20
MySQL error message: You have an error in your SQL syntax near 's.lastmodified>s.posted, s.lastmodified, s.posted) DESC LIMIT 0,20' at line 3