@No_Name wrote:
if I want to use two different protocols (switching) on the same pin, I have to use PB10 and PB11.
Yes, those pins will give you options for both USART3 (RX, TX) and I2C2 (SDA, SCL).
PB10 could be SPI2_SCK, but PB11 has no SPI functions - and you would need some other pins to make a full SPI connection.
There may also be other pin combinations available ...
Again, remember that the external hardware for I2C is usually different from UART - so you'd have to bear that in mind.
Also, you'd have to ensure that all connected devices are happy with the protocol changing.
As @waclawek.jan suggested, there's always bit-banging ...
PS:
For finding available combinations, it's probably easier to use Table 9:

Easier to identify which pins have I2C, SPI, and UART ...