Assuming that there is a mother who currently has physical custody of the child through a court order, in the State of Texas, technically the child can only make this decision without the court's approval at the age of 18.
Until the child has reached the age of majority (18 years old in Texas), the judge has the final say on where the child will live.
Having said that, however, if you and your child both wish to change the custody situation to one where you have sole physical custody you need to file a motion requesting a modification of custody. This motion needs to be filed in the family court where the original order was entered.
As children get older, judges will take their preferences into consideration more. Usually a child over the age of 11 or 12 will be heard by the judge. However, in the end the judge must examine all of the information and all of the facts and determine what is in the best interests of the child.
Children (defined as a person under the age of 18 in Texas) do not always know what is best for them. So while the judge will listen to the child's preferences and the reason's why, he will also look at the situation in both homes (mother and father), the potential disruption to the child's life (new school, loss of friends, new environment, etc.) and will ultimately decide based on the best interests.
So in general a child under the age of 11 has very little say while as child 11 and over has some say, and the older the child the more a judge will usually listen.
Please let me know if you have any other questions about this.