Execute command in entity with potion effect

Solution 1:

You will need to assign a label based on the mob's NBT data using /scoreboard first, and then target based on that label:

/scoreboard players tag @e[type=Creeper,tag=wb] remove wb
/scoreboard players tag @e[type=Creeper] add wb {ActiveEffects:[{Id:13b}]}

/effect @e[type=Creeper,tag=wb] minecraft:instant_damage 1 1

Solution 2:

This can be done in just one command in Minecraft 1.13

/effect give @e[type=creeper,nbt={ActiveEffects:[{Id:"minecraft:water_breathing"}]}] instant_damage 1 1`