Try this

=SUMPRODUCT(COUNTIF(C2:G2,$K$1:$O$1)*$K$2:$O$2)

Here's how that works...
With 
K1:O1 containing these values: A,  B, C, D, E
K2:O2 containing these values: 10, 8, 6, 4, 2

This part:
COUNTIF(C2:G2,$K$1:$O$1)
returns the counts of A's, B's, C's, D's, and E's in an array.

Here's an example of how it might look: {1,3,0,0,1}
That example indicates: 1_A, 3_B's, 0_C's, 0_D's, 2_E's

The COUNTIF array is multiplied by the values associated with 
each letter value (contained in K2:O2).

Still using my example:
={1,3,0,0,1} x {10, 8, 6, 4, 2}
={1x10, 3x8, 0x6, 0x4, 1x2}
={10, 24, 0, 0, 2}

And the SUMPRODUCT adds up those values to return: 36
I hope that helps.