you can make use of whatComesAfterLast and substring function to get first 2 digit of Case ID and the append the return value with needed string to get the expected result.
If you are going for this approach advantage will be in future if you are changing the case id prefix from "M" to double digit values like "FM", "GM"..etc. this code will work in expected way no need to have any code change.
Function = @substring(@String.whatComesAfterLast(Param.Case_ID,'-'),"0","2")
Param.Case_ID = This parameter should have case id value.