with t as (
    select info_id, staff_id, course,
    case when course like '%course1%' then 1 else 0 end as course1,
    case when course like '%course2%' then 1 else 0 end as course2,
    case when course like '%course3%' then 1 else 0 end as course3
    from cultivate_tb
)
select sum(course) as staff_nums
from (
    select course1 as course from t
    union all
    select course2 as course from t
    union all
    select course3 as course from t
) temp