The quote is from the ninth chapter, "I sommersi e i salvati" (The drowned and the saved).
Unfortunately I'm reading it in Italian so I can't provide the exact quote in English. Sorry also for any grammar mistakes :/
And follow up question: I know that homosexuals often were sent to the Lager, but did it happen also for Nazi officials?
So this is the paragraph in question:
The result of this pitiless process of natural selection could be read in the statistics of Lager population movements. At Auschwitz, in 1944, of the old Jewish prisoners (we will not speak of the others here, as their condition was different), “kleine Nummer” low numbers less than 150,000, only a few hundred had survived; not one was an ordinary Haftling, vegetating in the ordinary Kommandos, and subsisting on the normal ration. There remained only the doctors, tailors, shoemakers, musicians, cooks, young attractive homosexuals, friends or compatriots of some authority in the camp; or they were particularly pitiless, vigorous and inhuman individuals, installed (following an investiture by the SS command, which showed itself in such choices to possess satanic knowledge of human beings) in the posts of Kapos, Blockaltester, etc.; or finally, those who, without fulfilling particular functions, had always succeeded through their astuteness and energy in successfully organizing, gaining in this way, besides material advantages and reputation, the indulgence and esteem of the powerful people in the camp. Whosoever does not know how to become an “Organisator,” “Kombinator,” “Prominent” (the savage eloquence of these words!) soon becomes a “musselman.” In life, a third way exists, and is in fact the rule; it does not exist in the concentration camp.
In this instance, Levi is pretty clearly arguing that some such individuals would have traded sexual favors for survival, just as others would have traded their skills or used their brutality to ingratiate themselves with the Germans. Were they forced to do this? That's more difficult to say and depends on what you consider "forced" to mean.
I'm not familiar with forced homosexual prostitution. There was forced heterosexual prostitution though, and Dagmar Herzog covers this in her book Sex After Fascism.
Sorry, I have to run, otherwise I'd go into more depth. It's dinner time.
edit: words