Assume your lookup array is a1:h1 range, result array is a2:h2 and A3 has lookup value.

Then, write in A4 =COUNTIF($A1:A1,$A3) alternatively, you can use =COUNTIF($A1:A1,"*"&$A3&"*") for wildcard characters.

And In A5 =INDEX(2:2,MATCH(COLUMNS($A1:A1),4:4,0)) and drag A4 & A5 horizontally.