In studio settings, this is common, especially with talkback microphones. It's called ducking. Ducking is a type of side-chain compression.
This is the standard way of doing it, however, there is technically a second and third way to do it, which I will also describe below.
To setup a side-chain, you need a compressor with side chaining abilities, whether it be analog or digital. In an analog setup, you may see a 1/4" TRS cable jack, or possible two 1/4" jacks for separate Left and Right channels, that are labeled SC or Sidechain.
To use them, split the output signal from the sermon mic, and run that to the sidechain of the compressor. Then put the compressor in sidechain mode and set it up so that it attenuates appropriately, and patch that compressor into the choir mic channel.
What will happen is, every time the sermon mic picks up a signal, it will attenuate, or 'duck', the choir mics. This is volume dependent as well, so louder signals in the sermon mic will result in a quieter choir mic.
In a digital setting, this can be done on a DAW-specific basis. Every DAW handles side chaining in different ways, and some free DAWs don't even allow it.
Now, another way to do this is either with a gate or expander. These devices mute the channel or lower the volume (respectively) once the mic signal gets too quiet (falls below a threshold). These can be tricky to setup in such a way that not too much signal is being cut off, and for inexperienced users, it's common for the gate or expander to abruptly jump in and out.
I do recommend an expander as your best option for this scenario, but do plenty of research and lots of practice on setting it up first. Also, try to find an expander with a dual-threshold for this scenario.
The downside of a gate or expander in this scenario is that you will have to change the settings every single mass. It is very volume-dependent, and sensitive to volume changes, so the size of the choir, proximity to the mic, and even side of the congregation will all have an effect on the settings. Even the volume the pastor is speaking at. If the pastor has a cold or illness that affects his voice, the settings will have to be readjusted.
So I recommend using a gate or expander cautiously, as you will not be able to just set it up once and have it work every mass. It will require constant attention.
The third method is... kind of a physics hack in a way, and I'm not entirely sure it would work cleanly. It certainly WOULD work, but it might have some hiccups.
That method is to split the choir signal, reverse the polarity, and patch it into the output of the sermon mic, and then apply a gate to the sermon mic signal only on that channel.
Messy, I know, and it has some issues. It means that the choir mic can never play a sound at the same time as the sermon mic. It will abruptly cut in and out, and may sound odd at times. The pastor and choir will not be able to speak at the same time. It's also fairly complicated to setup.
I do not recommend this, but I'm just offering all options I can think of.