The maximum junction temperature of the 2SC1971 is 150C. This means that, if the ambient temperature is 150c, then the permitted disipation is zero watts, as any power in the junction will raise the temperature above 150C.
The junction to case thermal resistance is 10 degrees per watt. This means that, at 12 watts, the junction temperature will be 120 degrees hotter than the case.
So yes, if you can keep the case temperature below 30C (while it is pumping out 12 watts of heat) then this transistor can safely disipate 12 watts. Barely.
A good, reliable design will have a margin between the max permitted temp and the operating point. I would recomend at least 30 degrees. Of course, more margin is better.