To do an if/else between two different post-processing shaders:
1) read the depth of each pixel, use it to reconstruct position, test if the position is within your bounding box. Return white for true and black for false.
2) generate mipmaps for this black/white texture.
3) render your optional "if" post-processing quad. In the vertex shader, read from the 1x1 pixel mipmap of the black/white texture. If some threshold isn't met (tex>0 for "any pixels from the box visible", tex==1 for "all visible pixels are in the box") then multiply the vertex position by zero, which effectively hides the quad.
4) render an alternative "else" post-processing quad. In the vertex shader, perform the same test, but inverted (using 1-tex).
There's a bunch of caveats involved in doing this kind of thing in D3D9 though.
* To read the depth buffer in step (1), you either need to use D3DFMT_INTZ, or render depth to a regular texture yourself using a shader.
* To read from a texture in a vertex shader ("VTF") in steps (3/4), you likely need to use a floating point texture format such as D3DFMT_R16F or D3DFMT_A16B16G16R16F.
* Step 2 is automatic in D3D9 if you created that texture with the D3DUSAGE_AUTOGENMIPMAP flag.