Which antenna on an commercial airline airplane is used for the transponder (SSR)?
Short answer

The SSR antennas are labeled ATC L and ATC R (two at the top, two at the bottom).


Source

Both SSR and TCAS systems use the same communication protocol and use the same frequencies (1030 and 1090 MHz). They could well use the same antennas. However for best performance, SSR antennas are omnidirectional and TCAS antennas favor some sector, usually by beam forming.

  

On this B767-200 picture, TCAS antenna is the flat one at the front, and the yellow SSR antenna is a bit behind (only one):



See the full and higher quality photo by Ramon Jordi

Another airframe with two SSR antennas:


See the full and higher quality photo by Temo Madrigal

I was not able to find a good view of the SSR antenna on a B767-200, but on this A320, the two side yellow SSR antennas are more visible (as well as the single DME antenna behind):


A320 SSR antennas, source




Use and needs are different


  I guess that are sharing the same antenna. Am I right?


As said, you could be right as SSR and TCAS operate on the same L-band frequencies, and can't time overlap. But they have actually dedicated antennas, because they need different radiation patterns:


Transponder initial function consists in responding to SSR interrogators on the ground, and now in broadcasting ADS-B squitters in addition. The bottom SSR antenna is of some omnidirectional type, commonly a quarter wavelength monopole), Because the fuselage is not a perfect ground plane, the radiation pattern doesn't peak at the horizontal as one would expect, but has a privileged direction at 30° (source) below the aircraft plane, a low gain in the horizontal plane, and is nearly blind on its nadir.
TCAS on the contrary need to have a good reception in or close to the horizontal plane and around the nadir. They are the directions where the most immediate threats are coming from.


This is why the TCAS antenna is designed differently. Let's see the backside of the TCAS antenna shown earlier:


Source

Hum... not one antenna connectors, but four!

The flat shape of the TCAS radome (sometimes round) contains a 4-element phased array antenna which can be set to cover an hemisphere, but which can also focus on a quarter of this hemisphere. Example of design using a switched beam-forming network (SBFN):


Source: Microwaves &amp; RF

The four outputs labeled A1..A4 are connected to the four individual connectors under the radome.

TCAS uses the steering obtained with the array to select which direction to send interrogations and to listen to responses, in order to reduce synchronous garble from close mode C transponders responding simultaneously to the aircraft (1.7 NM radius), and FRUIT from all aircraft responding to a ground ATCRBS interrogation.

TCAS reverts the bottom antenna to the omnidirectional mode (same phase on the four antennas) and decreases RF power in landing and takeoff phases, to prevent radio spectrum overload.

For a Mode S transponder aircraft, we would have this kind of configuration:


ACAS II Guide

Note there is a connection between TCAS and SSR to inhibit each other when they are using the frequencies and protect their RF input. If I remember well, SSR mode has the priority (at least when the TCAS is not in a TA/RA phase).