Yes, using normal byte sized logic, you can do an XOR or a SUBLW, and check the STATUS bits. If you look onj the PICList theres a good size section about comparing values.
If you check my tutorials I do this in various ones, try checking the codelock in the keypad tutorial, where I check fior the correct keys.