If you need to compare multiple fields in your view while populating a computed column, take into consideration that the standard implementation of method SysComputedColumn::switch uses a map enumerator.
It means that your given order will be replaced in final SQL clause by alphabetical one of your keys.
For example, we want to populate field mgcProjInvoiceGLTransView.ParentProjectName for a given project id up to three level up in the project hierarchy. Let's assume that they are prepopulated in mgcProjInvoiceOnAccView view: projId1 is the parent of projId, projId2 is the parent of projId1, and so on.
Once we reference this computed column to the following method, we will get a new order in CASE construction on the SQL side.
Of course, it always returns the name of the parent on the first level, even though it had its own parent, which is incorrect result.
Therefore, the easiest way is to replace the aforementioned construction with a simple string.