Mayonnaise is made of a mixture of vegetable oil, water and some egg yolk. It might be possible to swim in mayonnaise (see below) for a short amount of time, but given it's high viscosity (mayonnaise has an absolute viscosity $\approx 2\times 10^5$ Poiselle which is far greater than water), you would have problems. But assuming one fell into this pool of mayonnaise, would you at least have enough buoyancy to survive for a little while by getting to the top or the edge of the pool?
The average human has mass $70\ kg$, volume $0.07\ m^3$ and knowing that mayonnaise has a density of about $910\ kg/m^3$, this person in a pool of mayonnaise would experience a buoyant force of $$F_b=\rho V g=910\times 0.07\times 9.8\approx 624\ \text{N} $$ The weight force of the same person is $$W=70\times 9.8\approx 700 \text{N}$$ and for comparison, in water the person has a buoyant force $$F_b=\rho V g=1000\times 0.07\times 9.8\approx 686\ \text{N} $$ since the density of water is close to $1,000 \ kg/m^3$. Note that this is slightly greater than for being submerged in mayonnaise. So it might be possible to at least get to the surface or to a close by edge with very vigorous strokes due to the high viscosity.
I am guessing though that due to the viscosity of mayo, if you fell deep enough, even your greatest efforts will end up in you sinking to the bottom. But if you were not that deep (perhaps less than a foot from the surface), you might be able to make use of your buoyancy (and strong enough strokes) to at least get to the surface/close edge and save yourself. But you'd be mad to try it unless it's done under controlled conditions and supervised by others.
- All of these calculations were done at standard temperature and pressure ($25^\circ$ Celsius and 1 atmosphere). Note also that reduced fat mayonnaise has a density of $1,000 \ kg/m^3$ which is very close to water.