It seems quite improbable that you need help comparing the data. Since all you need to do is use the
== operator
.
Example:
if(passwordEntered == GetPasswordFromDB(usernameEntered))
{
}
Note: See OriginalGriff's answer where he describes how you can avoid storing and comparing the password in clear text.