Yes you can, as long as you spell SELECT
correctly.
Here is an example you can copy and paste into your MySQL Query Browser to see a query of this type in action:
CREATE TABLE table1 (
id INT NOT NULL,
name1 VARCHAR(100) NOT NULL,
name2 VARCHAR(100) NOT NULL,
sortorder INT NOT NULL
);
INSERT INTO table1 (id, name1, name2, sortorder) VALUES
(1, 'Foo', 'Foo', 4),
(2, 'Boo', 'Unknown', 2),
(3, 'Bar', 'Bar', 3),
(4, 'Baz', 'Baz', 1);
SELECT id
FROM table1
WHERE name1 = name2
ORDER BY sortorder;
Result:
4
3
1