SELECT * FROM t_table ORDER BY case
WHEN field1 like '%字符串1%' then 4
WHEN field1 like '%字符串2%' then 2
WHEN field1 like '%字符串3%' then 3
end
asc
11-08
287
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-15
6970
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
SELECT * FROM t_table ORDER BY case
WHEN field1 like '%字符串1%' then 4
WHEN field1 like '%字符串2%' then 2
WHEN field1 like '%字符串3%' then 3
end
asc