In a knowledge-based system, rules can be defined to derive virtual attributes. Conflicts occur if multiple rules are applicable and one must be selected based on some criterion, such as priority. We identify important properties of a conflict resolution method and describe a technique for resolving conflicts and efficiently processing queries involving virtual attributes in a knowledge-based system. It is shown that by transforming a given, prioritized set of rules into a conflict-free, priority independent form it is possible to do query processing in a set-at-a-time manner. Algorithms for conflict resolution and query processing are given.