ρV2+ρgh= constant where, p is pressure energy per unit volume,
1
2
ρV2 is kinetic energy per unit volume and ρgh is potential energy per unit volume and for a system this value remains constant. Hence, Bernoulli's theorem is based on conservation of energy.