如果该表名为t,并且列名为col_name和col_sex,并且为col_name输入的字符串为string_value,那么您需要的是:
insert into t (col_came, col_sex) values (string_value, case when string_value like '%a' then 'F' else 'M' end);