select * from (
select
case
when (pc_name = 1 and ip=2 and db_name = 3) then 0
else 1
end sort,
...
from table
) q
where sort = 1
SELECT * FROM `table` WHERE `pc_name`=1 AND `ip`=2 AND `db_name`=3
SELECT * FROM `table` WHERE `pc_name`<>1 AND `ip`<>2 AND `db_name`<>3
SELECT * FROM `table` WHERE `pc_name`!=1 AND `ip`!=2 AND `db_name`!=3