Answer: Unfortunately based on your description it sounds like the cactus is rotting, probably due to overwatering and/or repotting into a poorly drained soil mix and/or into an oversized container. Excess humidity can also contribute to rotting and mold problems. You might be able to save at least part of it by cutting away the discolored portion. If you have a healthy tip, you could cut that off and try to root it. Allow the cut end to air dry for several days, then set it on the surface of the soil to see if it will root. Use a clean new container and fresh potting mix formulated specifically for cactus. Allow the soil to dry thoroughly between waterings, water just often enough that the cactus does not shrivel, perhaps once a month. Avoid wetting the cactus itself when you water. I'm sorry about your cactus.
Q&A Library Searching Tips