if ($pos(%msg, mother, 1)) echo someone says mother at $v1
elseif ($pos(%msg, father, 1)) echo someone says father at $v1
elseif ($pos(%msg, brother, 1)) echo someone says brother at $v1
elseif ($pos(%msg, sister, 1)) echo someone says sister at $v1
Note: I added a third parameter of 1 to each use of $pos() since it seems from the context that you want it to return the first position of the word in %msg, not the number of times it appears.