It's because the leading "2" falls between the leading "1" and the leading "5". You would need to LPAD the contents of the table and the string contained in @val to the same right justified length for it to work correctly.
--Jeff Moden
Change is inevitable... Change for the better is not.