I am looking for help in adjusting an exiting formula

I have the following array formula.

=IFERROR(INDEX('Actuals Input'!$AC$4:$AC$7885,SMALL(IF('Actuals Input'!$AF$4:$AF$7885=$C$52,ROW('Actuals Input'!$C$4:$C$7885)-3),ROW('Actuals Input'!B1))),"")

I want to amend the part that is underlined, so that it choses either column V or X based on the the value of 'Calculations'!B49 being TRUE for column X and FALSE for column V.