Does your field have to be stored in the database? A CB Query field is not stored so it won't help you in this regard. You'd have to use CB Auto Actions and a Field action acting after profile update and likely registration if you need the value stored. If you don't need it stored then your conditions are pretty basic and wouldn't waste SQL time to compile that, but instead a Custom HTML field with substitutions will work as follows.
Code:
[cb:if cb_lodgenumber="39" and cb_discipline="craft"][cb_lodgenumber][/cb:if]
[cb:if cb_lodgenumber="39" and cb_discipline="chapter"]C[cb_lodgenumber][/cb:if]
It sounds like you need it stored, but for sorting where? If a userlist then it could just be a part of the advanced sorting usage.