Before we start, it's worth noting that fungi really aren't more likely to develop intelligence than plants. Sure, there may be "intelligent" fungi, but there are plants that do the same things that are significantly safer than fungi, and that can inhabit a wider range of habitats. Making decisions about routing nutrients is not uncommon - and it's in no way closer to intelligent thought than, for instance, the reflexes of a carnivorous plant.
I still advise choosing plants instead, but that doesn't mean fungi cannot make it work.
Option #1: Start with a yeast
Yeasts are usually single-celled fungi. Some have been observed to produce longer chains - an excellent start to build some larger tissues. Similarly to how life is thought to have evolved from single-celled organisms long ago, you could provide the evolutionary pressures to develop yeasts extensively into larger animals.
A good starting pressure could be the need to compete for food (sugars in this case) due to scarcity in an environment. This would produce complex locomotion and sensory methods generations later, and perhaps small, multi-celled animals would evolve given enough time. They would no longer rely on parasitism or decomposition to procure sugars; an herbivorous lifestyle could develop. From there, the same basic evolutionary steps that produced humans can be followed.
Option #2: Require active response for survival
Your previous question has answers that can be adapted for this one.
@ChefCyanide said the following when describing how a plant would evolve intelligence:
As for evolution, this complex would require a rather unique environment, in which traditional methods of mating (pollination) and/or obtaining resources (photosynthesis) are possible and yet not ideal for survival and continuation of the species. An example of this could be an area frequently shrouded by large, dense, slow-moving clouds, or where there is virtually no wind or pollinating insects present.
While we are not dealing with plants, the same ideas apply: your organism must actively respond to stimuli relatively quickly. If you want to adapt a mycelial network (like that described in the top answer to the previous question) to become conscious, for example, you must make resources hard to get - and have it actively work for them.
Maybe food is scarce, or the soil is barren, so the fungus has to actively grow onto a nearby tree to sustain itself. Or perhaps it must divert energy into making a sweet-smelling chemical to attract insects, or change colors depending on the predator nearby. All of these processes could develop through mutation, specialization, and natural selection.
Eventually, it is possible for consciousness to develop in such an organism in order to respond more efficiently to the world around it. It may be a drastically different consciousness to our own, and it may not have the potential to develop communication or locomotion, but it will be able to think.
Option #3: Endosymbiosis
The cordyceps fungus has been observed infecting hundreds of species of insects. In some cases, it "hijacks" the brains of its hosts, compelling them to do specific actions - such as climbing trees, so that it can release its spores into the wind.
In a process called endosymbiosis, it may be possible for a similar fungus to coexist with its hosts. Perhaps it evolves the ability to release multiple rounds of spores. To spread them over a larger area, the host must be kept alive long enough to move around significantly. The fungus coexists with the hosts, and spreads to their offspring, until they're united as one "species". This favors the hosts, which are more likely to survive than other infected parts of the population - and may become immune to other invasive fungi if the space is already taken. It also favors the fungi, which now require less work to reproduce; they have the guarantee of the entire infected population.
The fungi may continue to produce chemicals that impact the hosts' brains. They may become more complex, and beneficial, over generations - allowing the fungus to "think" indirectly.