With schema and data like this:
create table t1( data text);
insert into t1 (data) values ('100');
insert into t1 (data) values ('6');
insert into t1 (data) values ('1');
insert into t1 (data) values ('2');
insert into t1 (data) values ('abc');
insert into t1 (data) values (null);
you can run this query:
select data,
case when length(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(data,'9',''),'8',''),'7',''),'6',''),'5',''),'4',''),'3',''),'2',''),'1',''),'0','')) = 0 then 0 else case when data is null then 99 else 50 end end sort_,
case when length(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(data,'9',''),'8',''),'7',''),'6',''),'5',''),'4',''),'3',''),'2',''),'1',''),'0','')) = 0 then CAST(data AS SIGNED) else 0 end int_
from t1 order by 2 asc, 3 asc;
with result:
+------+-------+------+
| data | sort_ | int_ |
+------+-------+------+
| 1 | 0 | 1 |
| 2 | 0 | 2 |
| 6 | 0 | 6 |
| 100 | 0 | 100 |
| abc | 50 | 0 |
| NULL | 99 | 0 |
+------+-------+------+
SHOW CREATE TABLE my_table\G
.SHOW CREATE TABLE\G
?