Lawyers decide to take cases based on their personal moral values all the time. Lawyers decide to take government cases based on their personal moral values, and indeed seek out certain government jobs based on their personal moral values. Pro-gay-rights lawyers might choose to take pro-gay-rights cases based on their personal moral values — including ones that seek to impose a certain moral viewpoint, such as that embodied in various antidiscrimination statutes, on all citizens.
Nor are lawyers whose moral values are based on secular philosophical principles (e.g., a humanist commitment to equal treatment, including legally coerced equal treatment) somehow have special moral or legal rights on this score. Lawyers whose moral values are based on religious principles, or whose commitment to a case is inspired by their religious principles, have precisely the same rights.