Ordinarily, yes, if you have a text message on your phone and it is relevant and material to the case, then you can submit it as evidence. However a lot depends on the particular circumstances of the case, so you should discuss it with a/your lawyer.