Quineoid Triple - A(B) = C
C, 243 240 180 132 57 bytes
f(int*v){ v[4]^=1;}

f(int*v){ v[4]^=2;}

f(int*v){ v[4]^=3;}

Try it online: A B C
The input program can be passed as a char* to the function f, and is implicitly converted to an int*.
-60 bytes thanks to @Neil
-48 bytes thanks to @Bubbler
-72 bytes thanks to @AZTECCO