In Lawrence v. Texas, the Court struck down the sodomy law but did not elevate sexual preference to a fundamental right How did the Court do this?
In this case, the Court struck down the Texas law on the basis of substantive due process. The Constitution says that people may not have their liberty taken away without due process of law. In this case, the Court held that this means that there are fundamental rights, like the right to private sexual conduct, that cannot be taken away without the due process of law. What the court was saying was that sexual conduct is such a private matter that the state should not be able to regulate it except in the most extreme cases.
However, the Court did not elevate sexual preference to the status of a fundamental right. If it had done so, it would have overturned the sodomy laws mainly on the basis of equal protection. The laws like that of Texas made conduct criminal for one set of people (same-sex couples) while not making it criminal for another set of people (opposite sex couples). If the Court had struck down the law on this basis, it would have been elevating sexual preference to the status of a fundamental right. It would also have been forcing states to allow same-sex marriage as a matter of equal protection. The Court was not willing to do this.