This kind of problem is much easier in XSLT 2.0 using operations such as tokenize() and xsl:analyze-string. But you can do it in 1.0 using constructs such as
substring-before(substring-after(@MSG, ',C='), ',')
(this one only works if C is neither the first nor the last param).
Of course, if the XML is generated, then a better solution would be to generate better XML, for example
<QUERYTRANSFORM ACTION="NOP">
<MSG>
<PARAM KEYWORD="A" VALUE="0"/>
<PARAM KEYWORD="B" VALUE="0"/>
etc.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference