Question: ```
Robot robot = new Robot();
BufferedImage screenShot = robot.createScreenCapture(new 
Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(screenShot, "JPG", new File("ScreenShot.jpg"));

```

This code will capture the screenshot of whatever is present on the desktop screen when test cases fail. But I need to take screenshot of chromedriver browser screen with URL. How can I capture the error scenario in selenium?

Answer: 
Try this:

```
WHERE ISNULL([Column],1) = CASE
                WHEN @Variable1 IN (1,2) THEN  1
                ELSE @Variable2
             END

```

P.S. Change value `1` to any value that not valid for `[Column]`.
```
WHERE CASE
  WHEN @Variable1 IN (1,2) AND [Column] IS NULL THEN 1
  WHEN [Column] = @Variable2 THEN 1
  ELSE 0 END = 1

```