データの持ち方を考え直しましょう
おそらく固定な情報部分A,Bと、可変なデータ部分C,D,E,F,Gをわけて管理します。
//情報部分
create table hoge_info (id int not null primary key,name_a varchar(10),name_b varchar(10));
insert into hoge_info values(1,'yx','bc'),(2,'yx','db'),(3,'wr','ky');
//データ部分
create table hoge_data (info_id int,info_kind varchar(10),val int,unique(info_id,info_kind,val));
insert into hoge_data values(1,'C',1),(1,'D',1),(1,'E',2),(1,'G',4)
,(2,'D',1),(2,'E',1),(2,'F',1),(3,'C',4),(3,'E',2),(3,'F',1),(3,'G',1);
//初期表示
select id,name_a as A,name_b as B
,d1.val as C,d2.val as D,d3.val as E,d4.val as F,d5.val as G
from hoge_info as i
left join hoge_data as d1 on i.id=d1.info_id and d1.info_kind='C'
left join hoge_data as d2 on i.id=d2.info_id and d2.info_kind='D'
left join hoge_data as d3 on i.id=d3.info_id and d3.info_kind='E'
left join hoge_data as d4 on i.id=d4.info_id and d4.info_kind='F'
left join hoge_data as d5 on i.id=d5.info_id and d5.info_kind='G';
//5以上を表示する
select info_id as id,sum(val) as vals
from hoge_data
group by info_id
having vals>=5