I have a long join that uses cross apply and convoluted columns. I have a parameter named @NonCAT. If this parameter is equals to "NonCAT" I want my fourth and fifth left joins to join on a different table. At first, I was thinking maybe there is a way to put an if statement there. Such as:I have a long join that uses cross apply and co