Given a set of values S, the XPath operator S=3 returns true if any value in the set is equal to 3. The xsl:value-of instruction (in XSLT 1.0) shows you the first value in S, ignoring the others.
I suspect you want
<xsl:when test="users/msgstatus[1]/@emailtypeid=5">
or perhaps
<xsl:when test="users[1]/msgstatus/@emailtypeid=5">
or perhaps
<xsl:when test="(users/msgstatus/@emailtypeid)[1]=5">
There's not much point using [1] on an attribute step because an element can only have one attribute with a given name.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference