If none of your transaction outputs is large enough to be the sole input, Bitcoin Core's coin selection algorithm does multiple rounds of randomly adding unspent transaction outputs until their total is greater than or equal to the amount you are trying to transfer. Finally, it selects the combination with the least resulting change.
In your example, it would use a combination of three of your four outputs, as 6BTC is more than the required 5BTC.
Therefore, you would end up with one of the four original 2BTC transaction outputs, and the change of your transaction as a new transaction output with 1BTC.