You did the right thing to move him to a QT tank, as Rift Valley cichlids are horrible about taking advantage of a weakened fish and harassing it until it is dead.
To address the wound first. Is the gash clear to the skull? Is there any skin hanging loose enough that it looks like it is loose enough to fall or rip right off? Is it actively bleeding, even if only a small amount?
Now to the swimming issues. Do you know if he was he wedged in because he was hiding, or did he become trapped when rockwork shifted? Did he try to wedge himself further when you were trying to rescue him or was he already completely immobilized? Hopefully you removed rock work to get him out rather than trying to pull him out.
It sounds to me like he might have some crushing damage from shifting rockwork, and it doesn't take much of a shift to crush a fish and cause internal damage. A lot of possibilities on the gash, too many to count. Can you get some pics? It might help. But honestly the prognosis isn't good from what you described. Sorry to be the bearer of bad news, but it's best IMO to be honest up front.
WYite