Assuming that the Data starts from B2 to H2
in B 8 enter this formula =if(b3>0,b2,"") - This will display only the header column which has data greater that 0.
In the next column, add this formula, A column is the helper column , so please keep the A column empty.
=IF(COLUMN()-COLUMN($A$2)+1<=COUNTIF($B$8:$H$8,"<>"),INDEX($B$8:$H$8,SMALL(IF($B$8:$H$8<>"",COLUMN($B$8:$H$8)-COLUMN($B$8)+1),COLUMNS(A$2:$A2))),"")
This is a array Formula (Shift+Ctrl+Enter)