How do you copy a single word from an SMS?
Sadly, you can't select a single word from a received SMS.

You're going to have to copy the whole SMS to a note (Or to the "reply" input), then select the part you want from that note.

That said, if the sent code is numeric, a user can directly copy it.
iOS will interpret it as a possible phone number, and allow several options when the number is touched &amp; held down.