That will depend on the app you are using and whether or not the app allows for it.
A standard texting app will probably not allow it since the sub- and super-script are just font changes, which most apps don't let you change in the middle of a message.