This kind of problem can be addressed in various ways. Basically, you need to have another connection that is marked as redundant and not used during PC3 availability.
A popular solution is the spanning tree protocol (RSTP or MSTP): both PC1 and PC2 are connected to a switch each and PC3 is connected between these switches. There's an additional, direct connection between the switches.
Per STP, the link across PC3 is configured to have priority (forwarding state) while the direct link is blocked. (PC3 needs to either transparently forward STP frames (BPDUs) or participate actively in STP as the root bridge.) Now, when PC3 goes down the switches detect the failing link and activate the previously blocked link. When PC3 comes up again that link gets priority and the direct link is blocked again.
You could realize a similar concept without the switches but that would require running a second connection between PC1 and PC2 and have them switch over by themselves. I guessed this is not what you want.
It's also possible to use other methods (proxy ARP, virtual IPs with GARP, a layer 3 connection with routing priority, ..) but they are somewhat more complicated.
The approach above assumes a network connection using Ethernet - you didn't clearly indicate what your scenario uses. Why so?
Firstly, this is NESE and we use networking technology. Secondly, a simple, serial link does not have the capability for running multiple connections between two nodes. It's basically a point-to-point physical layer link with nothing else to work with. You'd need to fail over this link using a physical layer approach, ie. using a hardware bypass switch.