Can I use 12awg ground from main panel to subpanel?
Conduit is your friend
You indicated these are THHN wires in liquid tight conduit. The bad news is that you can't just use a green ground as a neutral or hot, or use a white neutral wire as a hot. There are certain situations with cables where you can use a white as a hot or switched hot, but that is not the case in conduit.
There are only a few colors that matter in the US, and they definitely matter here:

White or gray = neutral
Green = ground
Black, red, blue, yellow, orange, etc. - basically everything else = hot

The good news is that you can run new wires as needed - that's the bonus of having conduit. For a proper subpanel, you should have 2 hots + neutral + ground. Ground and neutral separate from each other (remove the bonding screw if there is one and put neutral and ground on separate bars).
We can't guess what size conduit you have and, therefore, how many or what type of wires you can run through it. But assuming your 3 x 12 and 2 x 10 were installed correctly previously (i.e., not a problem with conduit fill), you should be able to remove the 3 x 12 and add 2 x 10 wires. Since you already have black and green, add a red and a white. That will give you a pretty standard:

Black = Hot
Red = Hot
White = Neutral
Green = Ground

Wire them all up to your 30A subpanel and you will have 30A x 240V or 60A x 120V (or some combination of 120V and 240V, depending on your needs). The 30A breaker in the house needs to be a double-breaker, not just 2 random breakers in the panel, so that you have the breakers on different legs so that you have 240V and so that you have common shutoff. Your 30A subpanel can actually have a larger breaker inside it as the breaker there is just a shutoff switch and not to protect the 10 AWG wires as the breaker in the house takes care of that.