How can i encrypt or hash a password inside a trigger using sha-256 so that i can store the hashed value in another table using that trigger? Also how can I decrypt it??
There are some free implementations of SHA2 just a google away. This blog post, for example.
As for decrypting a hashed password? I don't think you understand hashing. Hashing is 1-way. To check if a password is correct, you would hash it and compare it to the stored hash.